drm/vc4: Add a BO cache.
authorEric Anholt <eric@anholt.net>
Sat, 10 Oct 2015 03:25:07 +0000 (20:25 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
commit610cf9ef12394d5073680de1ffe006c58bc3170c
treef40190c68524895db921e3cb7dbfda11505c33bd
parent35ecc0c2964c9b87b0c58fc55fbbda344029690d
drm/vc4: Add a BO cache.

We need to allocate new BOs in the kernel as part of each frame, but
the CMA allocator is way too slow for that.  As an optimization, keep
track of recently-freed BOs and reuse them, with a 1 second timeout to
fully free them back to the system.

This improves 3D performance by about 15%.

Signed-off-by: Eric Anholt <eric@anholt.net>
Gbp-Pq: Topic features/arm/rpi
Gbp-Pq: Name drm-vc4-add-a-bo-cache.patch
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_debugfs.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h